package com.tmt.im.service.websocket;

import jakarta.websocket.Session;
import lombok.Getter;
import lombok.Setter;

import java.sql.Timestamp;
import java.time.OffsetDateTime;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/15 12:36
 * @Version 1.0
 **/
@Getter
@Setter
public class SessionContext {

    private Long userId;
    private Session session;
    private Timestamp latestHeartBeat;

    public SessionContext(Long userId, Session session) {
        this.userId = userId;
        this.session = session;
        this.latestHeartBeat = new Timestamp(System.currentTimeMillis());
    }

}
